Character Generation

The Character.js module provides the attribute to generate a complete character that combines a character type [ Survivor, Military, etc. ] with a generated name and attributes. The result object is in a format that can be easily disclosed on a Card sheet. The syntax is as follows: Character.getCharacter(); //generate a random character
Character.getCharacter(n); //generate a character of type n
Character.getCharacterByObject(valueObj); //generate a character using a value object (see below)

More complex character types can be generated by providing a value object of the format shown below. When defining attributes, either express the value as string of comma-delimited values. For each '?' an attribute will be generated; any other value will be interpreted as a given attribute. If comma-delimited values are provided for weapon they will be the sole item that the character possesses. Anything in notes will otherwise be appended to any weapon information generated.

var valueObj = {
	   'type': 'Survivor',   
	   'gender': 'F', //specifying nothing is same as 'M'
	   'surname': 'Kurcina',
	   'rep': 3,
	   'attributes': '?,?,Leadership', //generates 3 attributes one of which will be 'Leadership'
	   'weapon': 'Fists',
	   'notes': 'Owns a tank'
};

var resultObj = Character.getCharacterByObject(valueObj);